#pragma once

#include <CMath>
#include <iostream>
#include <stdio.h>
#include <vector>

using namespace std;

#define E 2.718281828459

class Network
{
public:
	/*double[][] inputWeight;
	double[][] outputWeight;
	double[] hiddenBias;
	double[] outputBias;
	double[] input;
	double[] hiddenLayer;
	double[] outputLayer;
	int inputLayerNumber, hiddenLayerNumber, outputLayerNumber;
	double learningRate = 0.3;
	double hitThreshold = 0.5;
	boolean isDebug = false;*/
	double ** inputWeight;
	double ** outputWeight;
	double * hiddenBias;
	double * outputBias;
	double * input;
	double * hiddenLayer;
	double * outputLayer;
	int inputLayerNumber, hiddenLayerNumber, outputLayerNumber;
	double learningRate;
	double hitThreshold;
	bool isDebug;
	int classNumber;
	Network(int inputLayerNumber, int hiddenLayerNumber, int outputLayerNumber);
	~Network();
	void setLearningRate(double l);
	void initNetwork();
	void initNetworkTest();
	void forword(double* input);
	void backpropagation(double* output);
	double getRandomValue();
	double getOutputFromInput(double input);
	void printNetwork();
	bool testTuple(vector<double>& input);
	double * getOutputFromNumber(double output);

};